import { Authority } from '../request'

const { get, post } = Authority

///////////////////////////  公路信息接口

// 查询列表
export const getHighwayList = params => get('/road/highway-info/v1/queryList', { params })

// 新增
export const addHighway = params => post('/road/highway-info/v1/addOrUpdate',  params )

// 更新
export const updateHighway = params => post('/road/highway-info/v1/update',  params )

// 公路下拉列表
export const getHighwaySelectList = params => get('/road/highway-info/v1/queryIdNameList', { params })




//////////////////////////////// 路段信息接口

// 查询列表
export const getRoadSectionList = params => get('/road/road-section-info/v1/queryList', { params })

// 新增
export const addRoadSection = params => post('/road/road-section-info/v1/add',  params )

// 更新
export const updateRoadSection = params => post('/road/road-section-info/v1/update',  params )

// 路段下拉列表
export const getRoadSectionSelectList = params => get('/road/road-section-info/v1/queryIdNameList', { params })

//////////////////////////////// 布控列表

// 查询列表
export const getRoadControlList = params => get('/arrangement/point/v1/queryList', { params })

// 新增
export const addRoadControl = params => post('/arrangement/point/v1/add',  params )

// 更新
export const updateRoadControl = params => post('/arrangement/point/v1/update',  params )

// 通过传感器id查询关联的路段
export const getDeviceRoadList = params => get('/road/road-section-associated-device/v1/queryRoadSectionInfoByDeviceId',  { params } )
